From ada9d8c9f20850fb8730b60c04942cddf746a45f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 3 Feb 2010 09:45:25 +0000 Subject: [PATCH] xl: Do not duplicate last line of config file when trying compat mode. Signed-off-by: Ian Jackson --- tools/libxl/xl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 694a950360..823c8177ec 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -344,6 +344,7 @@ static char* compat_config_file(const char *filename) } while (!feof(s)) { + buf[0] = 0; fgets(buf, size, s); while (buf[strlen(buf) - 1] != '\n' && !feof(s)) { size += 1024; -- 2.30.2